import { createRouter, createWebHistory } from 'vue-router'
import HomePage from '@/pages/HomePage.vue'
import ArticleDetailPage from '@/pages/ArticleDetailPage.vue'
import SubscriptionPage from '@/pages/SubscriptionPage.vue'
import SettingsPage from '@/pages/SettingsPage.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomePage
    },
    {
      path: '/article/:id',
      name: 'article-detail',
      component: ArticleDetailPage,
      props: true
    },
    {
      path: '/subscriptions',
      name: 'subscriptions',
      component: SubscriptionPage
    },
    {
      path: '/settings',
      name: 'settings',
      component: SettingsPage
    }
  ]
})

export default router
